package com.qianxiwitdoctor.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qianxi.wit.pojo.TbDiagnosticLogout;
import com.qianxiwitdoctor.mapper.TbDiagnosticLogoutMapper;
import com.qianxiwitdoctor.mapper.TbFacultyMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class TbSuffererService {

    @Autowired
    private TbDiagnosticLogoutMapper tbDiagnosticLogoutMapper;
    @Autowired
    private TbFacultyMapper facultyMapper;

    public Page<TbDiagnosticLogout> findSufferer(long doctorId, String doctorName, long pageNum, long pageSize) {

        Page<TbDiagnosticLogout> page = new Page<>(pageNum,pageSize);

        QueryWrapper<TbDiagnosticLogout> wrapper = new QueryWrapper<>();
        wrapper.eq("doctor_id",doctorId);
        tbDiagnosticLogoutMapper.selectPage(page,wrapper);
        return page;
    }
}
